package com.LiL.Wayne.Activity.fragment;

import java.util.ArrayList;

import android.graphics.Typeface;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.LiL.Wayne.Activity.R;
import com.audamob.audasingers.model.Song;
import com.audamob.audasingers.tool.adapter.VideosAdapter;
import com.audamob.audasingers.tool.view.ImageResizerUtils;
import com.audamob.data.DataSource;

public class SwipeyTabFragmentVideos extends Fragment {
	private ArrayList<Song> ListVideos;
	private boolean[] HideImageImageselection;
	private ListView ListVideo;
	private VideosAdapter adapter;

	static SwipeyTabFragmentVideos f;

	public static Fragment newInstance(String title) {
		f = new SwipeyTabFragmentVideos();
		Bundle args = new Bundle();
		args.putString("title", title);
		f.setArguments(args);

		return f;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		ViewGroup root = (ViewGroup) inflater.inflate(
				R.layout.auda_layout_activity_video, null);
		ViewGroup mainContainer = (ViewGroup) root
				.findViewById(R.id.MainContainer);
		Typeface font = Typeface.createFromAsset(getActivity().getAssets(),
				"ExoMedium.otf");

		ImageResizerUtils.setFont(getActivity(), mainContainer, font);

		final String title = getArguments().getString("title");

		ListVideos = DataSource.getListVideos();
		ListVideo = (ListView) root.findViewById(R.id.ListVideo);
		adapter = new VideosAdapter(getActivity(), ListVideos,
				VideosAdapter.MODE_SIMPLE, HideImageImageselection);
		ListVideo.setAdapter(adapter);

		// TODO Auto-generated method stub
		Log.d("YOUTUBEOUTUBE"," start");
		return root;

	}

	@Override
	public void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		
	}

	@Override
	public void onHiddenChanged(boolean hidden) {
		// TODO Auto-generated method stub
		super.onHiddenChanged(hidden);
		Log.d("Youtube"," hided");
	}

}